﻿using System;
using Microsoft.Practices.ObjectBuilder;
using System.Collections.Generic;
using System.Collections;
using Common;

namespace CSC440TeamOne.MyHealth.Views
{
	public partial class SubmitRecipe : Microsoft.Practices.CompositeWeb.Web.UI.Page, ISubmitRecipeView
	{
		private SubmitRecipePresenter _presenter;

		protected void Page_Load(object sender, EventArgs e)
		{
			if (!this.IsPostBack)
			{
				this._presenter.OnViewInitialized();
			}
			this._presenter.OnViewLoaded();
		}

		[CreateNew]
		public SubmitRecipePresenter Presenter
		{
			get
			{
				return this._presenter;
			}
			set
			{
				if(value == null)
					throw new ArgumentNullException("value");

				this._presenter = value;
				this._presenter.View = this;
			}
		}

		// TODO: Forward events to the presenter and show state to the user.
		// For examples of this, see the View-Presenter (with Application Controller) QuickStart:
		//	


        public void update(Common.SubmitRecipeModel model)
        {
            model = this.model;
        }

        public void show(Common.SubmitRecipeModel model)
        {
            IEnumerable<Recipe> recipes = model.recipes;

        }

        public SubmitRecipeModel model { get; set; }
    }
}

